﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DapperExtensions.Mapper;

namespace ZLWeb.WebApiEntity.EasyUse
{
    public class Alilog
    {
        private string _tllsh = string.Empty;
        private string _tlfjz = string.Empty;
        private DateTime? _tlsj =  DateTime.Now;
        private string _tlczrmc = string.Empty;
        private string _tljylsh = string.Empty;
        private string _tldxmjyhh = string.Empty;
        private string _tldxmjzh = string.Empty;
        private string _tlsjzfsm = string.Empty;
        private string _tlsjcxzffhwj = string.Empty;
        private string _tlglpno = string.Empty;
        private string _tlglpnopwd = string.Empty;
        private DateTime? _tlglywyyr = DateTime.Now;
        private string _tlglywjmmc = string.Empty;
        private string _tlglywxx = string.Empty;

        /// <summary>
        ///  操作记录：支付宝转账操作流水号
        /// </summary>
        public string tllsh
        {
            get { return _tllsh; }
            set { _tllsh = value; }
        }

        /// <summary>
        ///  操作记录：客户注册编码[cousercode 3位]+随机附加值LEFT（(通过newid()去除"-"生成)，17）[20位]
        /// </summary>
        public string tlfjz
        {
            get { return _tlfjz; }
            set { _tlfjz = value; }
        }

        /// <summary>
        ///  操作记录：发生时间(自然时间)
        /// </summary>
        public DateTime? tlsj
        {
            get { return _tlsj; }
            set { _tlsj = value; }
        }

        /// <summary>
        ///  操作记录：发生地点id(分支机构)
        /// </summary>
        public int tlddid { get; set; }

        /// <summary>
        ///  操作记录：操作人名称
        /// </summary>
        public string tlczrmc
        {
            get { return _tlczrmc; }
            set { _tlczrmc = value; }
        }

        /// <summary>
        ///  操作记录：充值金额
        /// </summary>
        public decimal tlglywje { get; set; }

        /// <summary>
        ///  操作记录：支付宝交易流水号
        /// </summary>
        public string tljylsh
        {
            get { return _tljylsh; }
            set { _tljylsh = value; }
        }

        /// <summary>
        ///  操作对象：买家支付宝用户号
        /// </summary>
        public string tldxmjyhh
        {
            get { return _tldxmjyhh; }
            set { _tldxmjyhh = value; }
        }

        /// <summary>
        ///  操作对象：买家支付宝账号
        /// </summary>
        public string tldxmjzh
        {
            get { return _tldxmjzh; }
            set { _tldxmjzh = value; }
        }

        /// <summary>
        ///  操作事件：有效标记（目前也表示业务是否成立）
        /// </summary>
        public short tlsjyxbj { get; set; }

        /// <summary>
        ///  操作事件：支付状态标记。0-未知 1-成功 2-失败
        /// </summary>
        public short tlsjzfbj { get; set; }

        /// <summary>
        ///  操作事件：支付状态说明(针对失败/未知的错误说明)
        /// </summary>
        public string tlsjzfsm
        {
            get { return _tlsjzfsm; }
            set { _tlsjzfsm = value; }
        }

        /// <summary>
        ///  操作事件：支付过程中发生的返回字符串
        /// </summary>
        public string tlsjcxzffhwj
        {
            get { return _tlsjcxzffhwj; }
            set { _tlsjcxzffhwj = value; }
        }

        /// <summary>
        ///  事件关联：预操作码
        /// </summary>
        public string tlglpno
        {
            get { return _tlglpno; }
            set { _tlglpno = value; }
        }

        /// <summary>
        ///  事件关联：预操作密码
        /// </summary>
        public string tlglpnopwd
        {
            get { return _tlglpnopwd; }
            set { _tlglpnopwd = value; }
        }

        /// <summary>
        ///  事件关联：业务制单日
        /// </summary>
        public DateTime? tlglywyyr
        {
            get { return _tlglywyyr; }
            set { _tlglywyyr = value; }
        }

        /// <summary>
        ///  事件关联：业务界面名称。显示字段。
        /// </summary>
        public string tlglywjmmc
        {
            get { return _tlglywjmmc; }
            set { _tlglywjmmc = value; }
        }

        /// <summary>
        ///  事件关联：业务摘要信息。(充值说明)
        /// </summary>
        public string tlglywxx
        {
            get { return _tlglywxx; }
            set { _tlglywxx = value; }
        }
    }

    public class AlilogMapper : ClassMapper<Alilog>
    {
        public AlilogMapper()
        {
            Table("#alilog");
            Map(f => f.tllsh).Column("tllsh");
            Map(f => f.tlfjz).Column("tlfjz");
            Map(f => f.tlsj).Column("tlsj");
            Map(f => f.tlddid).Column("tlddid");
            Map(f => f.tlczrmc).Column("tlczrmc");
            Map(f => f.tlglywje).Column("tlglywje");
            Map(f => f.tljylsh).Column("tljylsh");
            Map(f => f.tldxmjyhh).Column("tldxmjyhh");
            Map(f => f.tldxmjzh).Column("tldxmjzh");
            Map(f => f.tlsjyxbj).Column("tlsjyxbj");
            Map(f => f.tlsjzfbj).Column("tlsjzfbj");
            Map(f => f.tlsjzfsm).Column("tlsjzfsm");
            Map(f => f.tlsjcxzffhwj).Column("tlsjcxzffhwj");
            Map(f => f.tlglpno).Column("tlglpno");
            Map(f => f.tlglpnopwd).Column("tlglpnopwd");
            Map(f => f.tlglywyyr).Column("tlglywyyr");
            Map(f => f.tlglywjmmc).Column("tlglywjmmc");
            Map(f => f.tlglywxx).Column("tlglywxx");

        }
    }
}
